<!-- 底部菜单栏公共组件 -->
<template>
    <van-tabbar v-model="active" route>
        <van-tabbar-item v-for="item in tabbarItemRoutes"
         :icon="item.meta.icon"
         :to="item.path"
         :key="item.path"
        >
            {{ item.meta.title }}
        </van-tabbar-item>
    </van-tabbar>
</template>

<script setup  >
import { computed } from '@vue/reactivity';
import { ref } from 'vue'
import routes from '../../router/routes'
const active = ref(0)
const tabbarItemRoutes = computed(() => routes.filter(route => route.meta?.inMenu))
</script>

<style  scoped   lang="less">

</style>
